<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实现水平垂直居中的方式</title>
</head>

<body>
    <ol>
        <li>flex布局</li>
        <li>绝对定位</li>
        <li>绝对定位+transform</li>
        <li>line-height:文本居中</li>
        <li></li>
    </ol>


</body>

</html>
<style>
    /* flex布局 */
    .div {
        display: flex;
        justify-content: center;
        align-items: center;
    }
</style>